let path = require('path')
// 文件路径
let pathStr='/a/b/c/czk.html'

let pathName =path.basename(pathStr)

// 获取文件名，带后缀
console.log('pathName',pathName)

// 获取文件名，不带后缀，传入.html直接去除掉
let pathNameWithOutSuffix = path.basename(pathStr,'.html')

console.log('pathNameWithOutSuffix',pathNameWithOutSuffix)